using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;


namespace NJModelService.dotnet
{
    public class NjServer
    {
        [DllImport("NJModelServiceWrap.dll", EntryPoint = "njgis_service_createServerHandle", CharSet = CharSet.Auto, CallingConvention = CallingConvention.Cdecl)]
        public static extern int NJS_CreateServerHandle(byte[] ip, int port);

        [DllImport("NJModelServiceWrap.dll", EntryPoint = "njgis_service_createServiceAccessHandle", CharSet = CharSet.Auto, CallingConvention = CallingConvention.Cdecl)]
        public static extern int NJS_CreateServiceAccessHandle(byte[] server);

        [DllImport("NJModelServiceWrap.dll", EntryPoint = "njgis_service_createModelServiceList", CharSet = CharSet.Auto, CallingConvention = CallingConvention.Cdecl)]
        public static extern int NJS_CreateModelServiceList(byte[] access);

        [DllImport("NJModelServiceWrap.dll", EntryPoint = "njgis_service_cleanModelServiceListHandle", CharSet = CharSet.Auto, CallingConvention = CallingConvention.Cdecl)]
        public static extern int NJS_CleanModelServiceListHandle(byte[] list);

        [DllImport("NJModelServiceWrap.dll", EntryPoint = "njgis_service_getModelServiceCount", CharSet = CharSet.Auto, CallingConvention = CallingConvention.Cdecl)]
        public static extern int NJS_GetModelServiceListCount(byte[] list);

        [DllImport("NJModelServiceWrap.dll", EntryPoint = "njgis_service_getModelServiceByIndex", CharSet = CharSet.Auto, CallingConvention = CallingConvention.Cdecl)]
        public static extern int NJS_GetModelServiceByIndex(byte[] list, int index);

        [DllImport("NJModelServiceWrap.dll", EntryPoint = "njgis_service_getModelServiceOID", CharSet = CharSet.Auto, CallingConvention = CallingConvention.Cdecl)]
        public static extern byte[] NJS_GetModelServiceOID(byte[] ms);

        [DllImport("NJModelServiceWrap.dll", EntryPoint = "njgis_service_getModelServiceName", CharSet = CharSet.Auto, CallingConvention = CallingConvention.Cdecl)]
        public static extern byte[] NJS_GetModelServiceName(byte[] ms);

        [DllImport("NJModelServiceWrap.dll", EntryPoint = "njgis_service_getModelServiceType", CharSet = CharSet.Auto, CallingConvention = CallingConvention.Cdecl)]
        public static extern byte[] NJS_GetModelServiceType(byte[] ms);

    }
}
